package com.demo;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller    // 表示这是一个Controller
@RequestMapping(path="/dubbo") // 访问url从Application/spring/开始
public class MainController {
	
	@Resource
	private SayHiService sayHiService;
	
    @GetMapping(path="/SayHi")
    public @ResponseBody Object sayHi(HttpServletRequest request) {
    	return sayHiService.sayHi();
    }
}